package com.jdbc.day01.dao.impl;

import com.jdbc.day01.dao.EasybuyUserMapper;
import com.jdbc.day02.entitys.EasybuyUser;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import javax.naming.Name;
@Repository("sfs")
public class Usermapperimpl implements EasybuyUserMapper {

    private SqlSessionTemplate sqlsession;

    public SqlSessionTemplate getSqlsession() {
        return sqlsession;
    }

    public void setSqlsession(SqlSessionTemplate sqlsession) {
        this.sqlsession = sqlsession;
    }
    private EasybuyUserMapper Usermapper;

    public EasybuyUserMapper getUsermapper() {
        return Usermapper;
    }

    public void setUsermapper(EasybuyUserMapper usermapper) {
        Usermapper = usermapper;
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    @Override
    public int insert(EasybuyUser record) {
        return 0;
    }

    @Override
    public int insertSelective(EasybuyUser record) {
        return 0;
    }

    @Override
    public EasybuyUser selectByPrimaryKey(Integer id,String name) {
//        return sqlsession.getMapper(EasybuyUserMapper.class)
//                .selectByPrimaryKey(id,name);
       // return Usermapper.selectByPrimaryKey(id,name);
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(EasybuyUser record) {
        return sqlsession.getMapper(EasybuyUserMapper.class)
                .updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(EasybuyUser record) {
        return 0;
    }

    @Override
    public EasybuyUser selectBy(Integer id, String loginname, int sex) {
        return null;
    }


}